3.5.44 \(\int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx\) [444]

3.5.44.1 Optimal result
3.5.44.2 Mathematica [A] (verified)
3.5.44.3 Rubi [A] (verified)
3.5.44.4 Maple [F]
3.5.44.5 Fricas [F]
3.5.44.6 Sympy [F]
3.5.44.7 Maxima [F]
3.5.44.8 Giac [F]
3.5.44.9 Mupad [F(-1)]

3.5.44.1 Optimal result

Integrand size = 23, antiderivative size = 178 \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\frac {(d \cos (e+f x))^n \sin (e+f x)}{f (a+a \sec (e+f x))}-\frac {\cos (e+f x) (d \cos (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{a f \sqrt {\sin ^2(e+f x)}}+\frac {(1+n) \cos ^2(e+f x) (d \cos (e+f x))^n \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+n}{2},\frac {4+n}{2},\cos ^2(e+f x)\right ) \sin (e+f x)}{a f (2+n) \sqrt {\sin ^2(e+f x)}} \]

output
(d*cos(f*x+e))^n*sin(f*x+e)/f/(a+a*sec(f*x+e))-cos(f*x+e)*(d*cos(f*x+e))^n 
*hypergeom([1/2, 1/2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)/a/f/(sin( 
f*x+e)^2)^(1/2)+(1+n)*cos(f*x+e)^2*(d*cos(f*x+e))^n*hypergeom([1/2, 1+1/2* 
n],[2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)/a/f/(2+n)/(sin(f*x+e)^2)^(1/2)
 
3.5.44.2 Mathematica [A] (verified)

Time = 0.59 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.93 \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\frac {\cos (e+f x) (d \cos (e+f x))^n \sin (e+f x) \left (-2 (2+n) \cos ^2\left (\frac {1}{2} (e+f x)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3+n}{2},\cos ^2(e+f x)\right )+2 (1+n) \cos ^2\left (\frac {1}{2} (e+f x)\right ) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+n}{2},\frac {4+n}{2},\cos ^2(e+f x)\right )+(2+n) \sqrt {\sin ^2(e+f x)}\right )}{a f (2+n) (1+\cos (e+f x)) \sqrt {\sin ^2(e+f x)}} \]

input
Integrate[(d*Cos[e + f*x])^n/(a + a*Sec[e + f*x]),x]
 
output
(Cos[e + f*x]*(d*Cos[e + f*x])^n*Sin[e + f*x]*(-2*(2 + n)*Cos[(e + f*x)/2] 
^2*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2] + 2*(1 + n 
)*Cos[(e + f*x)/2]^2*Cos[e + f*x]*Hypergeometric2F1[1/2, (2 + n)/2, (4 + n 
)/2, Cos[e + f*x]^2] + (2 + n)*Sqrt[Sin[e + f*x]^2]))/(a*f*(2 + n)*(1 + Co 
s[e + f*x])*Sqrt[Sin[e + f*x]^2])
 
3.5.44.3 Rubi [A] (verified)

Time = 0.85 (sec) , antiderivative size = 207, normalized size of antiderivative = 1.16, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 4752, 3042, 4307, 3042, 4274, 3042, 4259, 3042, 3122}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d \cos (e+f x))^n}{a \sec (e+f x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\left (d \sin \left (e+f x+\frac {\pi }{2}\right )\right )^n}{a \csc \left (e+f x+\frac {\pi }{2}\right )+a}dx\)

\(\Big \downarrow \) 4752

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int \frac {(d \sec (e+f x))^{-n}}{\sec (e+f x) a+a}dx\)

\(\Big \downarrow \) 3042

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \int \frac {\left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n}}{\csc \left (e+f x+\frac {\pi }{2}\right ) a+a}dx\)

\(\Big \downarrow \) 4307

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \int (d \sec (e+f x))^{-n-1} (a-a \sec (e+f x))dx}{a^2}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n-1} \left (a-a \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx}{a^2}\right )\)

\(\Big \downarrow \) 4274

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \int (d \sec (e+f x))^{-n-1}dx-\frac {a \int (d \sec (e+f x))^{-n}dx}{d}\right )}{a^2}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n-1}dx-\frac {a \int \left (d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^{-n}dx}{d}\right )}{a^2}\right )\)

\(\Big \downarrow \) 4259

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\cos (e+f x)}{d}\right )^{n+1}dx-\frac {a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\cos (e+f x)}{d}\right )^ndx}{d}\right )}{a^2}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{d}\right )^{n+1}dx-\frac {a \left (\frac {\cos (e+f x)}{d}\right )^{-n} (d \sec (e+f x))^{-n} \int \left (\frac {\sin \left (e+f x+\frac {\pi }{2}\right )}{d}\right )^ndx}{d}\right )}{a^2}\right )\)

\(\Big \downarrow \) 3122

\(\displaystyle (d \cos (e+f x))^n (d \sec (e+f x))^n \left (\frac {d \tan (e+f x) (d \sec (e+f x))^{-n-1}}{f (a \sec (e+f x)+a)}-\frac {d (n+1) \left (\frac {a \sin (e+f x) (d \sec (e+f x))^{-n-1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+1}{2},\frac {n+3}{2},\cos ^2(e+f x)\right )}{f (n+1) \sqrt {\sin ^2(e+f x)}}-\frac {a d \sin (e+f x) (d \sec (e+f x))^{-n-2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n+2}{2},\frac {n+4}{2},\cos ^2(e+f x)\right )}{f (n+2) \sqrt {\sin ^2(e+f x)}}\right )}{a^2}\right )\)

input
Int[(d*Cos[e + f*x])^n/(a + a*Sec[e + f*x]),x]
 
output
(d*Cos[e + f*x])^n*(d*Sec[e + f*x])^n*(-((d*(1 + n)*(-((a*d*Hypergeometric 
2F1[1/2, (2 + n)/2, (4 + n)/2, Cos[e + f*x]^2]*(d*Sec[e + f*x])^(-2 - n)*S 
in[e + f*x])/(f*(2 + n)*Sqrt[Sin[e + f*x]^2])) + (a*Hypergeometric2F1[1/2, 
 (1 + n)/2, (3 + n)/2, Cos[e + f*x]^2]*(d*Sec[e + f*x])^(-1 - n)*Sin[e + f 
*x])/(f*(1 + n)*Sqrt[Sin[e + f*x]^2])))/a^2) + (d*(d*Sec[e + f*x])^(-1 - n 
)*Tan[e + f*x])/(f*(a + a*Sec[e + f*x])))
 

3.5.44.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3122
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( 
b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 
F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] 
 &&  !IntegerQ[2*n]
 

rule 4259
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^(n - 1)*((Sin[c + d*x]/b)^(n - 1)   Int[1/(Sin[c + d*x]/b)^n, x]), x] /; 
FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 

rule 4307
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( 
a_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((d*Csc[e + f*x])^(n - 1)/(a*f* 
(a + b*Csc[e + f*x]))), x] + Simp[d*((n - 1)/(a*b))   Int[(d*Csc[e + f*x])^ 
(n - 1)*(a - b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ 
[a^2 - b^2, 0]
 

rule 4752
Int[(u_)*((c_.)*sin[(a_.) + (b_.)*(x_)])^(m_.), x_Symbol] :> Simp[(c*Csc[a 
+ b*x])^m*(c*Sin[a + b*x])^m   Int[ActivateTrig[u]/(c*Csc[a + b*x])^m, x], 
x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[m] && KnownSecantIntegrandQ[u, x 
]
 
3.5.44.4 Maple [F]

\[\int \frac {\left (d \cos \left (f x +e \right )\right )^{n}}{a +a \sec \left (f x +e \right )}d x\]

input
int((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x)
 
output
int((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x)
 
3.5.44.5 Fricas [F]

\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \]

input
integrate((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x, algorithm="fricas")
 
output
integral((d*cos(f*x + e))^n/(a*sec(f*x + e) + a), x)
 
3.5.44.6 Sympy [F]

\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {\left (d \cos {\left (e + f x \right )}\right )^{n}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]

input
integrate((d*cos(f*x+e))**n/(a+a*sec(f*x+e)),x)
 
output
Integral((d*cos(e + f*x))**n/(sec(e + f*x) + 1), x)/a
 
3.5.44.7 Maxima [F]

\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \]

input
integrate((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x, algorithm="maxima")
 
output
integrate((d*cos(f*x + e))^n/(a*sec(f*x + e) + a), x)
 
3.5.44.8 Giac [F]

\[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\int { \frac {\left (d \cos \left (f x + e\right )\right )^{n}}{a \sec \left (f x + e\right ) + a} \,d x } \]

input
integrate((d*cos(f*x+e))^n/(a+a*sec(f*x+e)),x, algorithm="giac")
 
output
integrate((d*cos(f*x + e))^n/(a*sec(f*x + e) + a), x)
 
3.5.44.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(d \cos (e+f x))^n}{a+a \sec (e+f x)} \, dx=\int \frac {{\left (d\,\cos \left (e+f\,x\right )\right )}^n}{a+\frac {a}{\cos \left (e+f\,x\right )}} \,d x \]

input
int((d*cos(e + f*x))^n/(a + a/cos(e + f*x)),x)
 
output
int((d*cos(e + f*x))^n/(a + a/cos(e + f*x)), x)